package com.wsl.tibet_merchant_settlement.controller;

import com.dym.util.Result;
import com.wsl.pojo.Tb_seller;
import com.wsl.service.Tb_sellerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/seller")
public class Tb_sellerController {
    @Autowired
    private Tb_sellerService tb_sellerService;

    @RequestMapping("/insert")
    public Result insert(@RequestBody Tb_seller tb_seller) {
        try {
            tb_sellerService.insert(tb_seller);
            return new Result(true, "注册成功");
        } catch (Exception ex) {
            ex.printStackTrace();
            return new Result(false, "注册失败");
        }
    }
}
